package com.ace.log.file


import com.ace.log.decorator.IDecorator
import com.ace.log.file.clean.ICleanStrategy
import com.ace.log.file.name.IFileNameGenerator
import com.ace.log.printer.FilePrinter

class FileBuilder {

    var folderPath: String? = null

    var fileNameGenerator: IFileNameGenerator? = null

    var decorator: IDecorator? = null

    var cleanStrategy: ICleanStrategy? = null

    fun folderPath(folderPath: String): FileBuilder {
        this.folderPath = folderPath
        return this
    }

    fun fileNameGenerator(fileNameGenerator: IFileNameGenerator): FileBuilder {
        this.fileNameGenerator = fileNameGenerator
        return this
    }

    fun decorator(decorator:IDecorator): FileBuilder {
        this.decorator = decorator
        return this
    }

    fun cleanStrategy(cleanStrategy:ICleanStrategy): FileBuilder {
        this.cleanStrategy = cleanStrategy
        return this
    }

    fun build() = FilePrinter(this)
}